import { ResPage, Terminal, ResultData } from "@/api/interface/index";
import http from "@/api";

/**
 * @name 终端管理模块
 */
// 获取终端列表
export const getTerminalList = (params: Terminal.ReqTerminalInfoParams) => {
  return http.post<ResPage<Terminal.ResTerminalInfoList>>(`/electcollect/files/term/query`, params);
};
// 获取终端详情
export const getTerminalDtl = (params: { deviceId: string }) => {
  return http.post<ResultData>(`/electcollect/files/term/detail`, params);
};
// 新增终端
export const addTerminal = (params = {}) => {
  return http.post(`/electcollect/files/term/add`, params);
};
// 编辑终端
export const editTerminal = (params: { deviceId: string }) => {
  return http.post(`/electcollect/files/term/modify`, params);
};

// 删除终端
export const deleteTerminal = (params: { deviceList: { deviceId: string }[] }) => {
  return http.post(`/electcollect/files/term/remove`, params);
};

// 获取终端选择列表
export const getTerminalSelList = (params = {}) => {
  return http.post(`/electcollect/files/term/selectionList`, params);
};
